package top.yongyan0624.entity;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 *
 * @author 讽惘
 * @since 2021-05-13
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class SysUser extends BaseEntity {

    private static final long serialVersionUID = 1L;

    private String username;

    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String password;

    private String gender;

    private String signature;

    private String avatar;

    private String email;

    private String phone;

    private LocalDateTime lastLogin;

    @TableField(exist = false)
    private List<SysRole> roles = new ArrayList<>();

    @TableField(exist = false)
    private String token;

}
